<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		
		<form action="#" method="post">
			
		用户名：<input type="text"  id="username"  name="username" value="梁博" /> <br/>
		密码：  <input type="password"  abc="你好呀" id="password"  name="password"  />
			
			<input type="submit" value="登录"/>
		</form>
		
		
		<script type="text/javascript">
			
			//获取标签节点
			let password = document.getElementById('password');
			// 获取标签节点的属性子节点值 
			let abc = password.getAttribute('abc');
			alert(abc)
			
			let username =  document.getElementById('username');
			username.setAttribute('value',  '张三丰');
			
			
		</script>
	</body>
</html>
